import request from "@/utils/request.js";

/**
 * 获取用户信息
 * 
 */
export function getUserInfo() {
	return request.get('driverInfo');
}



/**
 * 获取今日班次
 * 
 */
export function getPlanToday() {
	return request.get('getTodayPlan');
}



/**
 * 开启运营班次
 * 
 */
export function startPlan(data) {
	return request.get("driver/start_plan", data);
}

/**
 * 结束运营班次
 * 
 */
export function endPlan(data) {
	return request.get("driver/end_plan", data);
}

/**
 * 司机端保存经纬度
 * 
 */
export function saveLocation(data) {
	return request.get("driver/save_location", data);
}

/*
 * 获取隐私协议
 * */
export function getUserAgreement() {
	return request.get("driver/user_agreement", {}, {
		noAuth: true
	});
}


/**
 * h5用户登录
 * @param data object 用户账号密码
 */
export function driverLogin(data) {
	return request.post("driver/driver_login", data, {
		noAuth: true
	});
}



